import Main from "@/components/main";
import parentView from "@/components/parent-view";

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */

export default [
    // {
    //     path: "/login",
    //     name: "login",
    //     meta: {
    //         title: "Login - 登录",
    //         hideInMenu: true
    //     },
    //     component: () => import("@/view/user-management/user-obj/user-obj.vue")
    // },

    {
    path: "/login",
    name: "login",
    meta: {
        title: "Login - 登录",
        hideInMenu: true
    },
    component: () => import("@/view/login/login.vue")
},
{
    path: "/questionnaire",
    name: "questionnaire",
    meta: {
        title: "测评入口",
        hideInMenu: true
    },
    component: () =>
        // import("@/view/questionnaire/questionnaire-ent/questionnaire-ent.vue")
        import("@/view/measurement/choose-questionnaire/choose-questionnaire.vue")
},
{
    path: "/test-page/:id",
    name: "test_page",
    meta: {
        hideInMenu: true
    },
    component: () =>
        // import("@/view/questionnaire/questionnaire-page/questionnaire-page.vue")
        import("@/view/measurement/unit-measurement/unit-measurement.vue")

},

{
    path: "/",
    name: "_home",
    redirect: "/home",
    component: Main,
    meta: {
        hideInMenu: true,
        notCache: true
    },
    children: [{
        path: "/home",
        name: "home",
        meta: {
            hideInMenu: true,
            title: "首页",
            notCache: true,
            icon: "md-home"
        },
        component: () => import("@/view/single-page/home")
    }]
},
{
    path: "/city_county_assessment",
    name: "city_county_assessment",
    meta: {
        icon: "md-menu",
        title: "市对县绩效考核指标",
        access: ["1.1", "1.2", "1.3", "1.4", "1.5", "5.1", "5.2", "5.3"]
    },
    component: Main,
    children: [{
        path: "/city_index_management",
        name: "city_index_management",
        meta: {
            // href: 'https://github.com/lison16',
            icon: "md-trending-up",
            title: "市对县指标管理",
            access: ["1.1"]
        },
        component: () =>
            import("@/view/city-county-assessment/city-index-management/city-index-management.vue")
    },
    {
        path: "/city_index_data",
        name: "city_index_data",
        meta: {
            icon: "md-stats",
            title: "市对县的指标考核数据",
            access: ["1.2"]
        },
        component: () =>
            import("@/view/city-county-assessment/city-index-data/city-index-data.vue")
    }, {
        path: "/city-submit",
        name: "city_submits",
        meta: {
            icon: "md-volume-down",
            title: "市对县报送情况",
            access: ["1.4"]
        },
        component: () =>
            import("@/view/city-county-assessment/city-submit/city-submit.vue")
    },
    {
        path: "/analysis-report",
        name: "analysis_reports",
        meta: {
            icon: "md-volume-down",
            title: "市对县指标分析报告",
            access: ["1.5"]
        },
        component: () =>
            import("@/view/city-county-assessment/analysis-report/analysis-report.vue")
    },
    {
        path: "/work_management",
        name: "work_management",
        meta: {
            icon: "md-trending-up",
            title: "专项工作督查指标管理",
            access: ["5.1"]
        },
        component: () =>
            import("@/view/work-supervision/work-management/work-management.vue")
    }, {
        path: "/work_data",
        name: "work_data",
        meta: {
            icon: "md-stats",
            title: "专项工作督查数据考核",
            access: ["5.2"]
        },
        component: () =>
            import("@/view/work-supervision/work-data/work-data.vue")
    }, {
        path: "/work_audit",
        name: "work_audit",
        meta: {
            icon: "md-checkbox-outline",
            title: "专项工作督查审核审批",
            hideInMenu: true
        },
        component: () =>
            import("@/view/work-supervision/work-audit/work-audit.vue")
    }
        // {
        //   path: "/city_index_audit",
        //   name: "city_index_audit",
        //   meta: {
        //     icon: "md-checkbox-outline",
        //     title: "指标审核审批",
        //     access: ["1.3"]
        //   },
        //   component: () =>
        //         import("@/view/city-county-assessment/city-index-audit/city-index-audit.vue")
        // }
    ]
},
{
    path: "/county_town_assessment",
    name: "county_town_assessment",
    meta: {
        icon: "md-menu",
        title: "县对乡镇绩效考核指标",
        access: ["2.1", "2.2", "2.3", "2.4"]
    },
    component: Main,
    children: [{
        path: "/county_index_management",
        name: "county_index_management",
        meta: {
            icon: "md-trending-up",
            title: "县对乡镇指标管理",
            access: ["2.1"]
        },
        component: () =>
            import("@/view/county-town-assessment/county-index-management/county-index-management.vue")
    },
    {
        path: "/county_index_data",
        name: "county_index_data",
        meta: {
            icon: "md-stats",
            title: "市对县的指标考核数据",
            access: ["2.2"]
        },
        component: () =>
            import("@/view/county-town-assessment/county-index-data/county-index-data.vue")
    },
    {
        path: "/county_index_audit",
        name: "county_index_audit",
        meta: {
            icon: "md-checkbox-outline",
            title: "指标审核审批",
            access: ["hide"]
        },
        component: () =>
            import("@/view/county-town-assessment/county-index-audit/county-index-audit.vue")
    },
    {
        path: "/country-submit",
        name: "country_submits",
        meta: {
            icon: "md-volume-down",
            title: "县对乡镇报送情况",
            access: ["2.4"]
        },
        component: () =>
            import("@/view/county-town-assessment/country-submit/country-submit.vue")
    },
    {
        path: "/index-analysis",
        name: "index_analysiss",
        meta: {
            icon: "md-checkbox-outline",
            title: "指标分析",
            access: ["2.3"]
        },
        component: () =>
            import("@/view/county-town-assessment/index-analysis/index-analysis.vue")
    }

    ]
},
{
    path: "/county_units_index",
    name: "county_units_index",
    meta: {
        icon: "md-menu",
        title: "县直单位绩效考核指标",
        access: ["3.1", "3.2", "3.3"]
    },
    component: Main,
    children: [{
        path: "/county_index_managements",
        name: "county_index_managements",
        meta: {
            icon: "md-trending-up",
            title: "县直单位指标管理",
            access: ["3.1"]
        },
        component: () =>
            import("@/view/county-units-index/county-index-managements/county-index-managements.vue")
    },
    {
        path: "/county_index_datas",
        name: "county_index_datas",
        meta: {
            icon: "md-stats",
            title: "县直单位指标考核数据",
            access: ["3.2"]
        },
        component: () =>
            import("@/view/county-units-index/county-index-datas/county-index-datas.vue")
    }, {
        path: "/countryUnit-submit",
        name: "countryUnit_submits",
        meta: {
            icon: "md-volume-down",
            title: "县直单位报送情况",
            access: ["3.3"]
        },
        component: () =>
            import("@/view/county-units-index/countryUnit-submit/countryUnit-submit.vue")
    }
    ]
},
// {  2019年没有六抓六赛
//   path: "/six_game_assessment",
//   name: "six_game_assessment",
//   meta: {
//     icon: "md-menu",
//     title: "六抓六赛绩效指标考核"
//   },
//   component: Main,
//   children: [{
//     path: "/six_game_management",
//     name: "six_game_management",
//     meta: {
//       icon: "md-trending-up",
//       title: "市对县指标管理",
//       access: ["admin"]
//     },
//     component: () =>
//           import("@/view/six-game-assessment/six-game-management/six-game-management.vue")
//   },
//   {
//     path: "/six_game_data",
//     name: "six_game_data",
//     meta: {
//       icon: "md-stats",
//       title: "市对县的指标考核数据"
//     },
//     component: () =>
//           import("@/view/six-game-assessment/six-game-data/six-game-data.vue")
//   },
//   {
//     path: "/six_game_audit",
//     name: "six_game_audit",
//     meta: {
//       icon: "md-checkbox-outline",
//       title: "指标审核审批",
//       access: ["admin", "responsible"]
//     },
//     component: () =>
//           import("@/view/six-game-assessment/six-game-audit/six-game-audit.vue")
//   }
//   ]
// },
{
    path: "/incentive",
    name: "incentive",
    meta: {
        hide: true,
        icon: "md-menu",
        access: ["4.1", "4.2", "4.3"]
    },
    component: Main,
    children: [{
        path: "/incentive_page",
        name: "incentive_page",
        meta: {
            icon: "md-flame",
            title: "正向激励",
            access: ["4.1"]
        },
        component: () => import("@/view/incentive/incentive-page/incentive.vue")
    },
    {
        path: "/incentive_audit",
        name: "incentive_audit",
        meta: {
            icon: "md-checkbox-outline",
            title: "正向激励审核审批",
            access: ["4.2"]
        },
        component: () =>
            import("@/view/incentive/incentive-audit/incentive-audit.vue")
    },
    {
        path: "/incentive_details/:id",
        name: "incentive_details",
        meta: {
            icon: "md-checkbox-outline",
            title: "正向激励详情",
            hideInMenu: true
        },
        component: () =>
            import("@/view/incentive/incentive-details/incentive-details.vue")
    }, {
        path: "/incentive-category",
        name: "incentive_categorys",
        meta: {
            icon: "md-pricetags",
            title: "事项类别定制",
            access: ["4.3"]
        },
        component: () =>
            import("@/view/incentive/incentive-category/incentive-category.vue")
    }
    ]
},
{
    path: "/investigate",
    name: "investigate",
    meta: {
        icon: "md-menu",
        title: "察访核验工作",
        access: ["6.1", "6.2", "6.3"]
    },
    component: Main,
    children: [{
        path: "/investigate_outbox",
        name: "investigate_outbox",
        meta: {
            icon: "md-funnel",
            title: "已发送文件",
            access: ["6.1"]
        },
        component: () =>
            import("@/view/investigate/investigate-outbox/investigate-outbox.vue")
    },
    {
        path: "/investigate_ide",
        name: "investigate_ide",
        meta: {
            icon: "ios-create-outline",
            title: "编辑邮件",
            access: ["6.2"]
        },
        component: () =>
            import("@/view/investigate/investigate-ide/investigate-ide.vue")
    },
    {
        path: "/investigate_inbox",
        name: "investigate_inbox",
        meta: {
            icon: "ios-mail-outline",
            title: "已收到邮件",
            access: ["6.3"]
        },
        component: () =>
            import("@/view/investigate/investigate-inbox/investigate-inbox.vue")
    },
    {
        path: "/investigate_watchEmail/:id",
        name: "investigate_watchEmail",
        meta: {
            title: "查看邮件",
            hideInMenu: true
        },
        component: () =>
            import("@/view/investigate/investigate-watchEmail/investigate-watchEmail.vue")
    }
    ]
},
// {
//   path: "/no-entry-unit",
//   name: "no_entry_unit",
//   meta: {
//     icon: "ios-search",
//     title: "未录入单位"
//   },
//   component: Main,
//   children: [{
//     path: "/no-entry-unit-city",
//     name: "no_entry_unit_city",
//     meta: {
//       icon: "md-funnel",
//       title: "乡镇指标未录入"
//     },
//     component: () =>
//           import("@/view/no-entry-unit/no-entry-unit-city/no-entry-unit-city.vue")
//   },
//   {
//     path: "/no-entry-unit-county",
//     name: "no_entry_unit_county",
//     meta: {
//       icon: "md-funnel",
//       title: "乡镇指标未录入"
//     },
//     component: () =>
//           import("@/view/no-entry-unit/no-entry-unit-county/no-entry-unit-county.vue")
//   },
//   {
//     path: "/no-entry-unit-game",
//     name: "no_entry_unit_game",
//     meta: {
//       icon: "ios-create-outline",
//       title: "六抓六赛未录入"
//     },
//     component: () =>
//           import("@/view/no-entry-unit/no-entry-unit-game/no-entry-unit-game.vue")
//   },
//   {
//     path: "no-entry-unit-all",
//     name: "no_entry_unit_all",
//     meta: {
//       icon: "ios-mail-outline",
//       title: "所以有未录入"
//     },
//     component: () =>
//           import("@/view/no-entry-unit/no-entry-unit-all/no-entry-unit-all.vue")
//   }
//   ]
// },
{
    path: "/measurement",
    name: "measurement",
    component: Main,
    meta: {
        title: "公众评议",
        icon: "md-menu",
        access: ["7.1", "7.2", "7.3", "10.7"]
    },
    children: [
        {
            path: "/user-test",
            name: "user_test",
            meta: {
                icon: "ios-construct",
                title: "测评对象管理",
                access: ["10.7"]
            },
            component: () =>
                import("@/view/user-management/user-test/user-test.vue")
        },
        {
            path: "/user-obj",
            name: "user_obj",
            meta: {
                icon: "md-person-add",
                title: "调查对象管理",
                access: ["10.7"]
            },
            component: () =>
            import("@/view/user-management/user-obj/user-obj.vue")
        },
        {
            path: "/question-naire",
            name: "question_naire",
            meta: {
                icon: "md-person-add",
                title: "问卷管理",
                access: ["10.7"]
            },
            component: () =>
            import("@/view/user-management/question-naire/question-naire.vue")
        },
        {
            path: "/wenjuan",
            name: "wenjuan",
            meta: {
                // icon: "md-person-add",
                // title: "问卷管理",
                hideInMenu: true,
                access: ["10.7"]
            },
            component: () =>
            import("@/view/user-management/question-naire/wenjuan.vue")
        },
        {
            path: "/userType",
            name: "userType",
            meta: {
                icon: "ios-construct",
                title: "测评用户类型管理",
                access: ["10.7"]
            },
            component: () =>
                import("@/view/user-management/userType/userType.vue")
        }
        // {
        //   path: "measurement-data",
        //   name: "measurement_data",
        //   meta: {
        //     icon: "md-person-add",
        //     title: "测评数据管理",
        //     access: ["7.1"]
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-data/measurement-data.vue")
        // },
        // {
        //   path: "measurement-res",
        //   name: "measurement_res",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "测评结果查看",
        //     access: ["7.2"]
        //   },
        //   component: () =>
        //         import("@/view/measurement/measurement-res/measurement-res.vue")
        // },
        // {
        //   path: "unit-measurement/:ids",
        //   name: "unit_measurements",
        //   meta: {
        //     icon: "ios-brush",
        //     title: "测评",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/unit-measurement/unit-measurement.vue")
        // },
        // {
        //   path: "measurement-mange",
        //   name: "measurement_manges",
        //   meta: {
        //     icon: "logo-buffer",
        //     title: "问卷调查管理",
        //     access: ["7.2"]
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-mange/measurement-mange.vue")
        // },
        // {
        //   path: "choose-questionnaire",
        //   name: "choose_questionnaires",
        //   meta: {
        //     icon: "ios-brush",
        //     title: "问卷调查",
        //     access: ["7.3"]
        //   },
        //   component: () =>
        //     import("@/view/measurement/choose-questionnaire/choose-questionnaire.vue")
        // },
        // {
        //   path: "measurement-pages/:id",
        //   name: "measurement_pages",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "试卷添加编辑",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-pages/measurement-pages.vue")
        // },
        // {
        //   path: "measurement-generate/:id",
        //   name: "measurement_generates",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "生成一类问卷",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-generate/measurement-generate.vue")
        // },
        // {
        //   path: "measurement-generate2/:id",
        //   name: "measurement_generate2s",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "生成二类问卷",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-generate2/measurement-generate2.vue")
        // },
        // {
        //   path: "measurement-details/:id",
        //   name: "measurement_details",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "查看试卷",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-details/measurement-details.vue")
        // },
        // {
        //   path: "measurement-answer/:id",
        //   name: "measurement_answer",
        //   meta: {
        //     icon: "ios-construct",
        //     title: "查看简答",
        //     hideInMenu: "true"
        //   },
        //   component: () =>
        //     import("@/view/measurement/measurement-answer/measurement-answer.vue")
        // }
    ]
},
{
    path: '/important-work-appraisal',
    name: 'important_work_appraisals',
    meta: {
        hide: true,
        title: "重点工作考评",
        access: ["8"]
    },
    component: Main,
    children: [{
        path: '/important-work-appraisal',
        name: 'important_work_appraisal',
        meta: {
            icon: "md-menu",
            title: '重点工作考评',
            access: ["8"]
        },
        component: () => import('@/view/important-work-appraisal/important-work-appraisal.vue')
    }]
},
{
    path: '/annual-total-score',
    name: 'annual_total_scores',
    meta: {
        hide: true,
        access: ["9"]
    },
    component: Main,
    children: [{
        path: '/annual-total-score',
        name: 'annual_total_score',
        meta: {
            icon: "md-menu",
            title: '绩效考核得分',
            access: ["9"]
        },
        component: () => import('@/view/annual-total-score/annual-total-score.vue')
    }]
},
{
    path: "/user-management",
    name: "user_mangement",
    component: Main,
    meta: {
        title: "系统管理",
        icon: "md-person-add",
        access: ["10.1", "10.2", "10.3", "10.4", "10.5", "10.6", "10.8"]
    },
    children: [{
        path: "/unit-classification",
        name: "unit_classification",
        meta: {
            icon: "ios-construct",
            title: "单位分类",
            access: ["10.1"]
        },
        component: () =>
            import("@/view/user-management/unit-classification/unit-classification")
    }, {
        path: "/user-department",
        name: "user_department",
        meta: {
            icon: "ios-construct",
            title: "单位管理",
            access: ["10.2"]
        },
        component: () =>
            import("@/view/user-management/user-department/user-department.vue")
    }, {
        path: "/user-account",
        name: "user_account",
        meta: {
            icon: "md-person-add",
            title: "用户管理",
            access: ["10.3"]
        },
        component: () =>
            import("@/view/user-management/user-account/user-account.vue")
    },
    {
        path: "/user-role",
        name: "user_role",
        meta: {
            icon: "md-person-add",
            title: "角色管理",
            access: ["10.4"]
        },
        component: () =>
            import("@/view/user-management/user-role/user-role.vue")
    },
    {
        path: "/user-diyset",
        name: "user_diyset",
        meta: {
            icon: "md-person-add",
            title: "自定义设置",
            access: ["10.5"]
        },
        component: () =>
            import("@/view/user-management/user-diyset/user-diyset.vue")
    },
    {
        path: "/dynamic_page",
        name: "dynamic_news_page",
        meta: {
            icon: "logo-twitter",
            title: "动态新闻",
            access: ["10.6"]
        },
        component: () =>
            import("@/view/dynamic-news/dynamic-news-page/dynamic-news-page.vue")
    }, {
        path: "/dynamic_edi",
        name: "dynamic_news_edi",
        meta: {
            icon: "ios-create-outline",
            title: "新闻编辑",
            access: ["10.8"]
        },
        component: () =>
            import("@/view/dynamic-news/dynamic-news-edi/dynamic-news-edi.vue")
    },

    {
        path: "/rights-management",
        name: "rights_management",
        meta: {
            icon: "ios-construct",
            title: "权限管理",
            access: ["hide"]
        },
        component: () =>
            import("@/view/user-management/rights-management/rights-management.vue")
    }
    ]
},
{
    path: '/zdemo',
    name: 'zdemos',
    meta: {
        hide: true,
        access: ["00"]
    },
    component: Main,
    children: [{
        path: '/zdemo',
        name: 'zdemo',
        meta: {
            icon: "md-menu",
            title: 'demo'
            // access: ["10.8"]
        },
        component: () => import('@/view/zdemo/zdemo.vue')
    }]
},
{
    path: "/401",
    name: "error_401",
    meta: {
        hideInMenu: true
    },
    component: () => import("@/view/error-page/401.vue")
},
{
    path: "/500",
    name: "error_500",
    meta: {
        hideInMenu: true
    },
    component: () => import("@/view/error-page/500.vue")
},
{
    path: "*",
    name: "error_404",
    meta: {
        hideInMenu: true
    },
    component: () => import("@/view/error-page/404.vue")
}
];
